package megajournal.domain;

/**
 *
 * @author cska
 */
public class Group_Teacher_Subject {

    private Long id;
    private Group group;
    private Teacher teacher;
    private Subject subject;

    public Group_Teacher_Subject() {
    }

    public Group_Teacher_Subject(Group group, Teacher teacher, Subject subject) {
        this.group = group;
        this.teacher = teacher;
        this.subject = subject;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setGroup(Group group) {
        this.group = group;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public void setSubject(Subject subject) {
        this.subject = subject;
    }

    public Long getId() {
        return id;
    }

    public Group getGroup() {
        return group;
    }

    public Subject getSubject() {
        return subject;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    @Override
    public String toString() {
        return teacher.toString()+" ведет у группы "+group.toString()+" "+subject.toString();
    }

}
